#include "Peer.h"

using namespace Hiranipra;
using namespace Hiranipra::Net;
//using namespace Hiranipra::Platform;

bool Peer::Send( uint8 channelId, Packet* packet )
{
	return ( enet_peer_send( _peer, channelId, packet->GetInternalPacket() ) == 0 );
}

void Peer::Disconnect( bool flushPending, uint32 data )
{
	if( flushPending == true )
		enet_peer_disconnect( _peer, data );
	else
		enet_peer_disconnect( _peer, data );
	_state = PeerDisconnecting;
}
